package fr.univ.lille1.android.network;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import retrofit.RestAdapter;
import fr.univ.lille1.android.domain.Message;
import fr.univ.lille1.android.domain.User;

public class MessageMockManager {
	private static final int ID = 0;
	private static final int LONG = 0;
	private static final int LAT = 0;

	private List<Message> mComments = new ArrayList<Message>();

	{
		final Date date = new Date(System.currentTimeMillis());
		User author = new User(ID, "Gérard", "", "androwiiid@gmail.com");
		Message comment = new Message(ID, "", "", LONG, LAT, date, author);
		mComments.add(comment);
		author = new User(ID, "Antoni", "", "antoni@gmail.com");
		comment = new Message(ID, "", "", LONG, LAT, date, author);
		mComments.add(comment);
		author = new User(ID, "Amina", "", "amina@gmail.com");
		comment = new Message(ID, "", "", LONG, LAT, date, author);
		mComments.add(comment);
		author = new User(ID, "Clément", "", "clement@gmail.com");
		comment = new Message(ID, "", "", LONG, LAT, date, author);
		mComments.add(comment);
		author = new User(ID, "Romuald", "", "romu@gmail.com");
		comment = new Message(ID, "", "", LONG, LAT, date, author);
		mComments.add(comment);
		author = new User(ID, "Sebastien", "", "seb@gmail.com");
		comment = new Message(ID, "", "", LONG, LAT, date, author);
		mComments.add(comment);
		author = new User(ID, "Valois", "", "valois@gmail.com");
		comment = new Message(ID, "", "", LONG, LAT, date, author);
		mComments.add(comment);
	}

	public MessageMockManager(final RestAdapter restAdapter) {
		// Do nothing with this rest adapter.
	}

	/**
	 * Find list of comment for a mock location.
	 * 
	 * @return List of message object
	 */
	public List<Message> findByLocation() {
		return mComments;
	}
}
